package com.github.bridge.client.esign.request;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import java.util.List;

/**
 * @program: signature-bridge-service
 * @description:
 * @author: hui.zhang
 * @date: 2024/8/25 11:04 上午
 **/
@Data
public class GeneratePdfFileRequest {

    @Schema(description = "模板id（己发布的模板id）", requiredMode = Schema.RequiredMode.REQUIRED)
    private String templateId;

    @Schema(description = "文件名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String fileName;

    @NotEmpty
    @Schema(description = "填充内容", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<ContentControl> contentsControl;

    @Data
    public static class ContentControl {

        private String contentId;

        @Schema(description = "内容控件id与内容域参数编码必填其一 contentId与contentCode都有值时以contentId为准 contentId与contentCode都没有值返回错误信息：内容域实例id与内容域参数编码必填其一\n" +
                "设置模板内容控件不校验控件长度，不同控件长度内容域编码可相同：pdf在使用该控件时以最小长度为填写校验、word文件控件根据填写长度自适应无需校验长度")
        private String contentCode;

        @Schema(description = "填充内容", requiredMode = Schema.RequiredMode.REQUIRED)
        private String contentValue;
    }


}
